﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BYS.XiAnComDept.BussLogic
{
    public class BllFactory : IDisposable
    {
        public ComDeptContext Db { get; set; }

        public BllFactory()
        {
            this.Db = new ComDeptContext();

            this.CompanyBll = new CompanyBll(this.Db);
            this.FundBll = new FundBll(this.Db);
            this.FundTypeBll = new FundTypeBll(this.Db);
            this.ProjectFieldBll = new ProjectFieldBll(this.Db);
        }

        public CompanyBll CompanyBll{ get; set; }

        public FundBll FundBll { get; set; }

        public FundTypeBll FundTypeBll { get; set; }

        public ProjectFieldBll ProjectFieldBll { get; set; }

        public void Dispose()
        {
            this.Db.Dispose();
        }
    }
}
